
$(function() {
	var a = $("fieldset[id^='contact']");
	count = a.length + 1;
	for (var i = 1; i < count; i++) {
		z.push(i);
	}

	ContactEdit.refresh();
	
	var _vv_option = {
		rules: {
			name: "required",
			fullname: "required"
		},
		errorPlacement: function(label, element) {
			label.insertAfter(element);
		},
		success: function(label) {
			label.html("&nbsp;").addClass("checked");
		}
	};
	
	validator = $("#form_edit").validate(_vv_option);

	$("select[name=category_t]").change(function() {
		var s = $("select[name=category_t]").val();
		if (s != null && s != '-')　{
			$("input[name=category]").val(s);
		}		
	});

	$('textarea').css("width", 400);
});
